movePageSliceIntoPage

abstract fun movePageSliceIntoPage(pageOrPageSlice: DesignBlock, page: DesignBlock, index: Int, options: MovePageSliceOptions = MovePageSliceOptions()): DesignBlock

Moves a page without page slices, or a page slice of another page, into a page with page slices. The content of the moved page or page slice moves along and keeps its ids. A moved page slice keeps its id. A page becomes a new page slice, and its id becomes invalid. The page slice keeps its size along the axis of page and takes the shared size across it. The moved content is placed above the content of page, in its own order. When the move takes the last page slice of its page, that page stays as an empty page without page slices. The move fails when a content block would change the page slice that owns it. Conversion keeps the supported appearance keyframes. Tracks of a page slice use the playback clock of its page. Conversion refuses preset animations and other tracks, such as geometry and crop tracks. MovePageSliceOptions.convertSourceToPage refuses a remaining page slice with preset animations or keyframes. Note that the call runs an internal update even when implicit updates are disabled. It records no undo step: call EditorApi.addUndoStep after the move, as after any other edit. It fails while the engine switches the active history.

Return

the id of the moved page slice. A failed move changes nothing.

Parameters

pageOrPageSlice

a page without page slices, or a page slice of another page of the same scene.

page

a page with page slices.

index

the position of the moved page slice among the page slices of page, hidden ones too, from 0 to the number of page slices.

options

the MovePageSliceOptions of the move.